<?php
	require ('../Http.php');
	
	function testHttp() {
		$url = "https://vod-api.xstore.ctyun.cn/xstore-vod/video/search";
		$dataJson='{"name":"测试视频1.mp4","pageIndex":0,"pageSize":10,"regionCode":["xs-cn-guangzhou-1"]}';
		$zoneDateTime="Thu, 26 Mar 2020 02:28:05 GMT";
		$sign="AWS uc9IRMe4MHCSbhsTxqkG:hphCAFg79SctU38lyY9IPTiD5H4=";
		
		$http = new Http ();
		$headers = array();
		$headers[] = "Date:".$zoneDateTime;
		$headers[] = "signature:".$sign;
		$headers[] = "Content-Type:application/json;charset=utf-8";
		$httpOptions = array (
				CURLOPT_HTTPHEADER => $headers 
		);
		$result = $http->doPost ( $url, $dataJson, $httpOptions );
		var_dump($result);
	}
	
	testHttp ();
	
?>
